<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>计算</title>
    <script>   var num = 0;

    function run1() {
        var ele = document.getElementById("s1");
        num += ele;
    }
    alert(num)
    </script>
</head>
<body>
<div id="s1">
    <font>1</font>
    <span>2</span>
    <div>3</div>
</div>
</body>
</html>